<%@ page import="com.dailyblue.java.jdbc.pack0325.dao.EmpDAO" %>
<%@ page import="java.util.List" %>
<%@ page import="com.dailyblue.java.jdbc.pack0325.bean.Emp" %>
<%@ page isELIgnored="false" pageEncoding="UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    // 获取到用户需要访问的页面
    int p = Integer.parseInt(request.getParameter("page"));
    EmpDAO edao = new EmpDAO();
    List<Emp> list = edao.findEmp(p);
    int allPageNum = edao.getAllPageNum(5);
    session.setAttribute("EMP_LIST", list);
    session.setAttribute("ALL_PAGE_NUM", allPageNum);
    response.sendRedirect("emp.jsp");
%>